import { SET_MENU_ID } from "../action/menu";

const initState = {
  activeMenuId: "chat"
};
type Action = {
  type: any;
  payload: string;
};
const menuReducer = (state = initState, action: Action) => {
  const { type, payload } = action;
  switch (type) {
    case SET_MENU_ID:
      return {
        ...state,
        activeMenuId: payload
      };

    default:
      return state;
  }
};

export default menuReducer;
